package org.dromara.apartment.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.dromara.common.core.enums.ArrayValuable;

import java.util.Arrays;

/**
 * 图片类型
 * @author CKJ
 * @description: 图片类型
 * @date 2025/6/19 09:14
 */
@AllArgsConstructor
@Getter
public enum ItemType implements ArrayValuable<Integer> {

    APARTMENT(1, "公寓"),

    ROOM(2, "房间");


    /**
     * 值
     */
    @EnumValue
    @JsonValue
    private final Integer type;

    /**
     * 名字
     */
    private final String name;


    public static final Integer[] ARRAYS = Arrays.stream(values()).map(ItemType::getType).toArray(Integer[]::new);

    @Override
    public Integer[] array() {
        return ARRAYS;
    }
}
